<!DOCTYPE html>
<html>
<head>
	<title>angularDemo</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script src="angular.min.js"></script>
	<script>
		//从后台获取数据

		var app = angular.module('myApp',[])

        //定义控制器
		app.controller('myController',function($scope,$http){
		    $scope.findAll = function () {
				$http.get('data.json').success(
				    function (response) {
						$scope.list=response;
                    }
				);
            }
		});
	</script>

</head>
<body ng-app="myApp" ng-controller="myController" ng-init="findAll()">

	<table>
		<tr>
			<td>姓名</td>
			<td>数学</td>
			<td>语文</td>
		</tr>
		<tr ng-repeat="entity in list">
			<td>{{entity.name}}</td>
			<td>{{entity.shuxue}}</td>
			<td>{{entity.yuwen}}</td>
		</tr>
	</table>

</body>
</html>